Exporting Patient Data
In order for you or your application to make a request to the Provider Access API, you’ll first need to request a bearer token on behalf of your client. With that token you’ll then be able to export some mocked Sandbox FHIR data. Let’s do this manually ourselves to get an understanding of what’s happening here.
You can do this using any tool of your choice, choose the instructions that suit you!
Where did this data come from?
While the Sandbox FHIR data you’ve received is mocked, the system delivering the proper data for your Sandbox Client is exactly what’s handling Production requests! The Provider Access Sandbox Client you created was mapped to a mocked NPI. Once you gain production access as a Provider Organization, your Production Clients you create will be attributed your actual organization’s NPI.
That access token you retrieved contains that NPI. If you’d like, you can paste that token into jwt.io and checkout everything within the token. While this NPI we used is not associated with a real Provider Organization, we have seeded our policy information data store with real attribution data as if a Payer had members that were treated by this Provider. Those members, or Patients, then have data stored on the 1up FHIR Server associated with them.
So the request you made grabbed required data that the payer had stored for any Patients they have attributed to your Organization.
Postman Collection
Click here for information on Authentication & Authorization APIs.
cURL
-
Copy your newly created Client’s ID from the table, and secret using the right hand kebab selector.
-
Make a request to retrieve a token, by requesting the proper scope needed to make a Bulk FHIR data export request. Substituting your client id and secret.

curl --location 'https://gateway.1up.health/auth/realms/dev-portal/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<add-your-client-id-here>' \
--data-urlencode 'client_secret=<add-your-client-secret-here>' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=bulk-data|user/*.rs'
-
Copy the access_token. You will use this token for subsequent requests.
-
Make your FHIR Bulk Export request by substituting xxx for your copied access token.
-
Step 4 should have returned a payload that gives you a URL to track your asynchronous export job. Copy that URL and make another request to check on its progress. You will continue to use that access token for all of your requests.
-
As your jobs complete, that endpoint will continue to return URLs for downloadable files of your data. Copy that file name, and make another request to download it.
-
Confirm and inspect the FHIR data for your patients.